import {useRef} from 'react'

export default  ()=>{

    let inputRef =useRef(null); 


    let handleChange=(e)=>{
     //console.log("aaaa");
      let obj = inputRef.current;
      //获得输入框的值
      let val = obj.value;
      console.log(val);

    }

    return(
        <input ref={inputRef} onChange={handleChange}></input>
    )
}